Ext.define('core.product.view.ProductForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.productform',
    id: 'productform',
    // layout:'fit',
    layout: {
        type: "table",
        columns: 1
    },
    align: "left",
    defaults: {
        margin: "10 0 0 15",
        selectOnFocus: true,
        allowBlank: true,
        width: 300,
        msgTarget: "side" //提示信息现在的位置
    },
    tbar: [{
        xtype: "button",
        ref: "save",
        iconCls: "table_save",
        text: "保存"
    }, {
        text: '重置',
        iconCls: "wfreturn",
        ref: "reset"
    }, {
        xtype: "button",
        ref: "return",
        iconCls: "return",
        text: "返回"
    }],
    items: [{
        xtype: 'textfield',
        name: 'id',
        fieldLabel: 'id',
        allowBlank: false
    }, {
        xtype: 'textfield',
        name: 'groupId',
        allowBlank: false,
        fieldLabel: '任务组ID'
    }, {
        xtype: 'textfield',
        name: 'cronExpression',
        fieldLabel: 'CRON表达式'
    }, {
        xtype: 'datefield',
        name: 'startTime',
        format: 'Y-m-d',
        fieldLabel: '开始时间'
    }, {
        xtype: 'datefield',
        name: 'stopTime',
        format: 'Y-m-d',
        fieldLabel: '结束时间'
    }, {
        xtype: 'textfield',
        name: 'ipAddr',
        fieldLabel: '执行IP'
    }, {
        xtype: 'combobox',
        name: 'status',
        fieldLabel: '启用状态',
        allowBlank: false,
        store: Ext.create("Ext.data.Store", {
            fields: ["value", "name"],
            data: [
                {value: '1', name: "启用"},
                {value: '0', name: "停用"}
            ]
        }),
        forceSelection: true,
        queryMode: 'local',
        displayField: 'name',
        valueField: 'value',
        // value:'0',
        emptyText: '请选择'
    }, {
        //     xtype: 'combobox',
        //     fieldLabel: '驱动类',
        //     name: 'dbDriver',
        //     store: Ext.create("Ext.data.Store", {
        //         fields: ["value", "name"],
        //         data: [
        //             {value: 'com.mysql.jdbc.Driver', name: "mysql"},
        //             {value: 'oracle.jdbc.driver.OracleDriver', name: "oracle"},
        //             {value: 'com.ibm.db2.jcc.DB2Driver', name: "db2"}
        //         ]
        //     }),
        //     forceSelection: true,
        //     queryMode: 'local',
        //     displayField: 'name',
        //     valueField: 'value',
        //     emptyText: '请选择'
        // }, {
        xtype: 'textfield',
        name: 'quartzJobClass',
        width: 500,
        fieldLabel: '执行类'
    }, {
        height: 153,
        bodyStyle: 'background:transparent',//设置为透明,不妨碍更换主题了
        border: 0
    }],
    initComponent: function () {
        this.callParent(arguments);
    }
});
